$np + 6nq - 7n - 8 = -3p - 2$ Solve for $n$.
Combine constant terms on the right. $np + 6nq - 7n - {8} = -3p - {2}$ $np + 6nq - 7n = -3p + {6}$ Notice that all the terms on the left-hand side of the equation have $n$ in them. $1{n}p + 6{n}q - 7{n} = -3p + 6$ Factor out the $n$ ${n} \cdot \left( p + 6q - 7 \right) = -3p + 6$ Isolate the $n$ $n \cdot \left( {p + 6q - 7} \right) = -3p + 6$ $n = \dfrac{ -3p + 6 }{ {p + 6q - 7} }$